<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Código-Fonte de population_thread.h</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javaScript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Gerado por Doxygen 1.6.3 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Busca');
--></script>
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Página&nbsp;Principal</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Arquivos</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <img id="MSearchSelect" src="search/search.png"
             onmouseover="return searchBox.OnSearchSelectShow()"
             onmouseout="return searchBox.OnSearchSelectHide()"
             alt=""/>
        <input type="text" id="MSearchField" value="Busca" accesskey="S"
             onfocus="searchBox.OnSearchFieldFocus(true)" 
             onblur="searchBox.OnSearchFieldFocus(false)" 
             onkeyup="searchBox.OnSearchFieldChange(event)"/>
        <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
        </div>
      </li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>Lista&nbsp;de&nbsp;Arquivos</span></a></li>
      <li><a href="globals.html"><span>Arquivos&nbsp;Membros</span></a></li>
    </ul>
  </div>
<h1>population_thread.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef POPULATION_THREAD_H</span>
<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define POPULATION_THREAD_H</span>
<a name="l00003"></a>00003 <span class="preprocessor"></span>
<a name="l00004"></a>00004 <span class="preprocessor">#include &quot;<a class="code" href="definitions_8h.html">definitions.h</a>&quot;</span>
<a name="l00005"></a>00005 <span class="preprocessor">#include &quot;<a class="code" href="population_8h.html">population.h</a>&quot;</span>
<a name="l00006"></a>00006 
<a name="l00007"></a>00007 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> _ty = GAtype,<span class="keyword">typename</span> _realTy = GAreal_type&gt; <span class="keyword">class </span><a class="code" href="classpopulation__thread.html">population_thread</a>; 
<a name="l00008"></a>00008 
<a name="l00009"></a>00009 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> _ty,<span class="keyword">typename</span> _realTy&gt; 
<a name="l00010"></a><a class="code" href="classpopulation__thread.html">00010</a> <span class="keyword">class </span><a class="code" href="classpopulation__thread.html">population_thread</a> : <span class="keyword">public</span> <a class="code" href="classpopulation.html">population</a>&lt;_ty,_realTy&gt;
<a name="l00011"></a>00011 {
<a name="l00012"></a>00012   <span class="keyword">public</span>:
<a name="l00013"></a>00013 
<a name="l00014"></a>00014     <span class="comment">//seta os valores dos indivíduso no intervalo entre os iterators first e second do vetor de indivíduos</span>
<a name="l00015"></a>00015     <span class="keywordtype">void</span> <a class="code" href="classpopulation.html#a10331bd5a9f8f4879cea62ee8b1f28c3">SetIndividualsValue</a> (<span class="keyword">typename</span> <a class="code" href="classpopulation.html">population&lt;_ty,_realTy&gt;::it_</a> first, <span class="keyword">typename</span> <a class="code" href="classpopulation.html">population&lt;_ty,_realTy&gt;::it_</a> second);
<a name="l00016"></a>00016 };
<a name="l00017"></a>00017 
<a name="l00018"></a>00018 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> _ty,<span class="keyword">typename</span> _realTy&gt;
<a name="l00019"></a>00019 <span class="keywordtype">void</span> <a class="code" href="classpopulation.html#a10331bd5a9f8f4879cea62ee8b1f28c3">population_thread&lt;_ty,_realTy&gt;::SetIndividualsValue</a>(<span class="keyword">typename</span> <a class="code" href="classpopulation.html">population&lt;_ty,_realTy&gt;::it_</a> first, <span class="keyword">typename</span> <a class="code" href="classpopulation.html">population&lt;_ty,_realTy&gt;::it_</a> second)
<a name="l00020"></a>00020 {
<a name="l00021"></a>00021   <span class="keywordflow">for</span> (<span class="keyword">typename</span> <a class="code" href="classpopulation.html">population&lt;_ty,_realTy&gt;::it_</a> pop_it = first; pop_it &lt; second; ++pop_it)
<a name="l00022"></a>00022   {
<a name="l00023"></a>00023     std::vector&lt;_realTy&gt; position = (*pop_it)-&gt;GetRealPosition();
<a name="l00024"></a>00024     (*pop_it)-&gt;SetValue(GetObjectiveFunction(position));
<a name="l00025"></a>00025   }
<a name="l00026"></a>00026 }
<a name="l00027"></a>00027 
<a name="l00028"></a>00028 <span class="preprocessor">#endif //POPULATION_THREAD_H  </span>
</pre></div></div>
<!--- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&nbsp;</span>Todos</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&nbsp;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&nbsp;</span>Arquivos</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&nbsp;</span>Funções</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&nbsp;</span>Variáveis</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&nbsp;</span>Definições de Tipos</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&nbsp;</span>Amigas</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<hr class="footer"/><address style="text-align: right;"><small>Gerado em Sat Oct 30 13:47:50 2010 por&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
</body>
</html>
